using Furion;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Minio;

namespace Kevin.Dapr.MinIO
{
    public class Startup : AppStartup
    {
        public void ConfigureServices(IServiceCollection services)
        {
            #region minio客户端注入
            var minioClient = new MinioClient().WithEndpoint(App.Configuration.GetValue<string>("MinIOSettings:EndpointDomain"), App.Configuration.GetValue<int>("MinIOSettings:EndpointPort"))
                .WithCredentials(App.Configuration["MinIOSettings:AccessKey"].ToString(), App.Configuration["MinIOSettings:SecretKey"].ToString()).Build();
            services.AddSingleton(minioClient);
            #endregion
        }
    }
}
